// 传入的key类型，应该是obj当中key的其中之一    

interface IKun {
    name: string
    age: number
}

type IKunKeys = keyof IKun


function getObjectProperty<O, K extends keyof O>(obj: O, key: K) {
    return obj[key]
}

const info = {
    name: "baki",
    age: 18,
    height: 1.99
}

const name = getObjectProperty(info, "name")

export {

}